package org.rohmh.user.domain;

import java.util.Date;

import javax.persistence.AttributeOverrides;
import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.MapsId;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.rohmh.generic.entity.UUIDEntity;
import org.rohmh.security.domain.Users;


@Entity
@Table(name="rohmh_member")
public class Member extends UUIDEntity<Member> {

	@Id
	@OneToOne
	@JoinColumn(name = "user_id")
	private Users user;

	private String firstName;
	private String middleName;
	private String lastName;
	private String emailAddress;
	private String phoneNumber;

	@Embedded 
	private Address address;

	protected Member() {
		// TODO Auto-generated constructor stub
	}

    public Member(Users user) {
        this.user = user;
    }

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getMiddleName() {
		return middleName;
	}

	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public Address getAddress() { 
		return address; 
	}

	public void setAddress(Address address) { 
		this.address = address; 
	}

	public Users getUser() {
		return user;
	}

	public void setUser(Users user) {
		this.user = user;
	}
}